<div class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <?= form_open('user/tasks/update_subtask')?> 
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Edit Subtask</h3>
  </div>
  <div class="modal-body">
 
  <?php 
foreach($subtasks as $subtask)
{
?>
  <table width="100%">
  <tr  valign="top">
    <td width="70%">
    <input type="hidden" value="<?= $subtask->id?>" name="id" />
    <input type="hidden" value="<?= $subtask->task_id?>" name="taskid" />
    <label><b>Description</b></label>
	<textarea name="desc" class="span3"><?= $subtask->desc?></textarea>
	</td> 	
	<td width="30%" <?php if($this->ion_auth->is_client()) {?>  style="display:none;" <?php }?> >	
	<div class="row-fluid">
	<label><b>Time Spent</b></label>
	<?php 
	$time = explode(':',$subtask->time_spent);	
	?>	
	<input type="text" class="span3" value="<?php echo $time[0]?>" name="hr" /> : <input type="text" name="min" class="span3" value="<?php echo $time[1]?>" /> : <input type="text" class="span3" value="<?php echo $time[2]?>" name="sec" />
	</div>	
	</td>
    </tr>
	</table>
	<table width="100%" class="table">
  <tr>  
  <td><b>Priority</b></td> 
    <td width="30%"> 
	<label class="radio">
	<input type="radio" value="low"  id="radioBtn1" onmouseup="toggle(this);" name="priority" 
    <?php if($subtask->priority == 'low'){
	echo 'checked="checked"' ;
	}?>
     />
    <span class="low_box"></span> <span class="text-warning"> &nbsp; Low Priority </span>
	</label>
    </td>
    <td width="30%">
	<label class="radio">
	<input type="radio" value="medium"  id="radioBtn2"  onmouseup="toggle(this);" name="priority" 
     <?php if($subtask->priority == 'medium'){
	echo 'checked="checked"' ;
	}?>  /> 
	<span class="medium_box"></span> <span class="text-success"> &nbsp; Medium Priority </span>
	</label>
    </td>
	<td width="30%">
	<label class="radio">
	<input type="radio" value="high"  id="radioBtn3" onmouseup="toggle(this);" name="priority" 
     <?php if($subtask->priority == 'high'){
	echo 'checked="checked"' ;
	}?>
     />
    <span class="high_box"></span> <span class="text-error"> &nbsp; High Priority </span>
    </label>
    </td>
    
    </tr>
  
</table> 

<?php }?>

  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
    <input type="submit" class="btn btn-primary" value="Update" />
  </div>
  </form>
</div>
